package com.hst.capacity.domain.model.response.setting;

import com.hst.capacity.domain.model.entity.franchisee.FranchiseeEntity;
import com.hst.capacity.domain.model.entity.setting.airport.AirportEntity;
import lombok.Data;

@Data
public class AirportVO {

    private String idFranchisee;
    private String idAirport;
    private String cityCode;
    private String cityName;
    private String name;
    private String coordinate;
    private String lat;
    private String lng;

    public AirportVO(){
    }

    public AirportVO(AirportEntity entity){
        this.idAirport = entity.getIdAirport();
        this.name = entity.getName();
        this.lat = String.valueOf(entity.getLat());
        this.lng = String.valueOf(entity.getLng());
        this.coordinate = String.format("%s,%s",lat,lng);
    }

    public AirportVO(FranchiseeEntity franEntity, AirportEntity airportEntity) {
        this.idFranchisee = franEntity.getIdFranchisee();
        this.idAirport = airportEntity.getIdAirport();
        this.cityCode = airportEntity.getCityCode();
        this.cityName = airportEntity.getCityName();
    }

}
